package Parequet;

import java.util.Objects;

public class Bean {
    private int id;
    private int age;
    private String name;
    private String place;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    @Override
    public String toString() {
        return "Bean{" +
                "id=" + id +
                ", age=" + age +
                ", name='" + name + '\'' +
                ", place='" + place + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Bean bean = (Bean) o;
        return id == bean.id &&
                age == bean.age &&
                name.equals(bean.name) &&
                place.equals(bean.place);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, age, name, place);
    }
}
